package com.huang.community.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.huang.community.pojo.Message;
import org.springframework.stereotype.Service;

import java.util.List;

public interface MessageService extends IService<Message> {
    public List<Message> findConversations(int userId, int offset, int limit);
    public int findConversationCount(int userId);
    public List<Message> findLetters(String conversationId, int offset, int limit);
    public int findLetterCount(String conversationId);
    public int findLetterUnreadCount(int userId, String conversationId);
    public int readMessage(List<Integer> ids);
    public int addMessage(Message message);
    public List<Message> findNotices(int userId, String topic, int offset, int limit);
    public int findNoticeUnreadCount(int userId, String topic);
    public int findNoticeCount(int userId, String topic);
    public Message findLatestNotice(int userId, String topic);

}
